cmake_minimum_required(VERSION 3.15)
project(face_demo_client)

#set(CMAKE_C_COMPILER /home/yuan/x86-64-core-i7--glibc--stable/bin/x86_64-linux-gcc)
#set(CMAKE_CXX_COMPILER /home/yuan/x86-64-core-i7--glibc--stable/bin/x86_64-linux-g++)

set(CMAKE_CXX_STANDARD  20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(BUILD_TYPE dummy)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#User Muse change it according envrionment
set(OpenCV_DIR /usr/local/opt/opencv@3/share/OpenCV)
find_package(OpenCV)

set(APP_TOP ${CMAKE_CURRENT_SOURCE_DIR})

if (UNIX)
   add_compile_options(-std=c++17 -Wno-deprecated-declarations)
   set(FFMPEG_ROOT  $ENV{HOME}/buildroot)
endif()

set(common_inc_dirs ${APP_TOP}/client_common
        ${OpenCV_INCLUDE_DIRS}
        ${FFMPEG_ROOT}/include
        ${APP_TOP}/../otl
        ${APP_TOP}/third_party/jsoncpp
)
set(common_link_dirs /opt/tops/lib)

if (WIN32)
   set(DEV_ROOT c:\\dev)
   set(FFMPEG_ROOT ${DEV_ROOT}\\ffmpeg)
   include_directories(${FFMPEG_ROOT}\\include)
   set(OpenCV_DIR ${DEV_ROOT}\\opencv)
   find_package(OpenCV REQUIRED)
   include_directories(${OpenCV_INCLUDE_DIRS})
   link_directories(${OpenCV_LIBS} ${FFMPEG_ROOT}\\lib)
   
endif()

add_subdirectory(third_party/jsoncpp)
add_subdirectory(detect_client)
